package com.wechet.exception;

import com.wechet.common.OrderStatus;
import com.wechet.common.ProductStatus;
import com.wechet.common.ResultStatus;
import com.wechet.common.UserStatus;
import lombok.Getter;

/**
 * Created by sc on 2017/9/21.
 */
@Getter
public class SellException extends RuntimeException {
    private Integer code;

    public SellException(ProductStatus productStatus){
        super(productStatus.getMsg());
        this.code = productStatus.getCode();
    }
    public SellException(OrderStatus orderStatus){
        super(orderStatus.getMsg());
        this.code = orderStatus.getCode();
    }
    public SellException(ResultStatus resultStatus){
        super(resultStatus.getMsg());
        this.code = resultStatus.getCode();
    }

    public SellException(UserStatus userStatus) {
        super(userStatus.getMsg());
        this.code = userStatus.getCode();
    }
    public SellException(String msg){
        super(msg);


    }

}
